#if !defined SeqList_h
#define SeqList_
#include"user.h"
#include<fstream>
#include<iostream>
using namespace std;
#include<cassert>
const int tinitSize=100;
const int tincrement=20;
template<typename T>
class SeqList{
public:
    SeqList(int sz=tinitSize);
    SeqList(const SeqList<T>&L);
    ~SeqList();
    void createList();
    int size()const;
    int length() const;
    int search(T&x)const;
    int searchByNum (string num)const;
    int locate(int i)const;
    bool getData(int i,T&x)const;
    bool setData(int i,T&x)const;
    bool insert(int i,T&x);
    bool append(T&x);
    bool remove(int i,T&x);
    bool isEmpty();
    bool isFull();
    void traverseList();
    SeqList<T>operator=(SqeList<T>&L);
    T& operator[](int i);
    T*begin();
    void readFromFile(char*FileName);
    void writeToFile(char*FileName);
private:
    T*data;
    int listSize;
    int length;
    void resize(int newSize);
    };
#endif
